From 2697ac5770d3fc81e857b0f8bed9545d8407398d Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 3 Apr 2012 10:51:36 +0200 Subject: [PATCH] testinput: Fix cursor rendering Make sure custom cursors are rendered at integer coordinates, otherwise there will be leftover alpha borders when we remove the cursor. --- tests/testinput.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testinput.c b/tests/testinput.c index 957e6ae122..2a2e4cc8ee 100644 --- a/tests/testinput.c +++ b/tests/testinput.c @@ -25,6 +25,7 @@ #include "config.h" #include #include "gtk/gtk.h" +#include /* Backing surface for drawing area */ @@ -46,6 +47,9 @@ update_cursor (GtkWidget *widget, gdouble x, gdouble y) static gint cursor_present = 0; gint state = !gdk_device_get_has_cursor (current_device) && cursor_proximity; + x = floor (x); + y = floor (y); + if (surface != NULL) { cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget)); -- 2.30.2